.class public Les/u30;
.super Ljava/lang/Object;
.source "GoogleSignInHelper.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Les/u30$b;
    }
.end annotation


# static fields
.field private static d:Les/u30;

.field private static e:Les/u30$b;


# instance fields
.field private a:Les/v30;

.field private b:Lcom/estrongs/android/ui/dialog/r;

.field private c:I


# direct methods
.method private constructor <init>()V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Lcom/estrongs/android/pop/f;

    invoke-direct {v0}, Lcom/estrongs/android/pop/f;-><init>()V

    iput-object v0, p0, Les/u30;->a:Les/v30;

    return-void
.end method

.method private a(Landroid/app/Activity;)V
    .locals 2

    .line 19
    invoke-direct {p0}, Les/u30;->d()V

    const-string v0, "fail"

    .line 20
    invoke-virtual {p0, v0}, Les/u30;->a(Ljava/lang/String;)V

    const v0, 0x7f1106ee

    const/4 v1, 0x1

    .line 21
    invoke-static {p1, v0, v1}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;II)V

    return-void
.end method

.method public static a(Les/u30$b;)V
    .locals 0

    .line 10
    sput-object p0, Les/u30;->e:Les/u30$b;

    return-void
.end method

.method static synthetic a(Les/u30;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Les/u30;->d()V

    return-void
.end method

.method static synthetic a(Les/u30;Landroid/app/Activity;Ljava/lang/String;)V
    .locals 0

    .line 2
    invoke-direct {p0, p1, p2}, Les/u30;->b(Landroid/app/Activity;Ljava/lang/String;)V

    return-void
.end method

.method private a(Landroid/app/Activity;Ljava/lang/String;)Z
    .locals 2

    .line 22
    new-instance v0, Les/u30$a;

    invoke-direct {v0, p0, p1, p2}, Les/u30$a;-><init>(Les/u30;Landroid/app/Activity;Ljava/lang/String;)V

    .line 23
    sget-object p1, Landroid/os/AsyncTask;->THREAD_POOL_EXECUTOR:Ljava/util/concurrent/Executor;

    const/4 p2, 0x0

    new-array v1, p2, [Ljava/lang/Void;

    invoke-virtual {v0, p1, v1}, Landroid/os/AsyncTask;->executeOnExecutor(Ljava/util/concurrent/Executor;[Ljava/lang/Object;)Landroid/os/AsyncTask;

    return p2
.end method

.method private b(Landroid/app/Activity;)V
    .locals 1

    .line 8
    iget-object v0, p0, Les/u30;->b:Lcom/estrongs/android/ui/dialog/r;

    if-nez v0, :cond_0

    .line 9
    invoke-static {p1}, Lcom/estrongs/android/ui/dialog/r;->a(Landroid/content/Context;)Lcom/estrongs/android/ui/dialog/r;

    move-result-object p1

    iput-object p1, p0, Les/u30;->b:Lcom/estrongs/android/ui/dialog/r;

    .line 10
    :cond_0
    iget-object p1, p0, Les/u30;->b:Lcom/estrongs/android/ui/dialog/r;

    invoke-virtual {p1}, Landroid/app/Dialog;->show()V

    return-void
.end method

.method private b(Landroid/app/Activity;I)V
    .locals 2

    .line 2
    invoke-direct {p0, p1}, Les/u30;->b(Landroid/app/Activity;)V

    .line 3
    iget-object v0, p0, Les/u30;->a:Les/v30;

    invoke-interface {v0, p1}, Les/v30;->b(Landroid/app/Activity;)Landroid/content/Intent;

    move-result-object v0

    const/4 v1, 0x2

    if-ne p2, v1, :cond_0

    const/16 p2, 0x1031

    .line 4
    invoke-virtual {p1, v0, p2}, Landroid/app/Activity;->startActivityForResult(Landroid/content/Intent;I)V

    goto :goto_0

    :cond_0
    const/4 v1, 0x1

    if-ne p2, v1, :cond_1

    const/16 p2, 0x1032

    .line 5
    invoke-virtual {p1, v0, p2}, Landroid/app/Activity;->startActivityForResult(Landroid/content/Intent;I)V

    goto :goto_0

    :cond_1
    const/4 v1, 0x3

    if-ne p2, v1, :cond_2

    const/16 p2, 0x1035

    .line 6
    invoke-virtual {p1, v0, p2}, Landroid/app/Activity;->startActivityForResult(Landroid/content/Intent;I)V

    .line 7
    :cond_2
    :goto_0
    invoke-virtual {p0}, Les/u30;->b()V

    return-void
.end method

.method private b(Landroid/app/Activity;Ljava/lang/String;)V
    .locals 1

    .line 11
    invoke-static {}, Lcom/estrongs/android/pop/l;->L1()Lcom/estrongs/android/pop/l;

    move-result-object v0

    invoke-virtual {v0, p1}, Lcom/estrongs/android/pop/l;->a(Landroid/content/Context;)Lcom/estrongs/fs/g;

    move-result-object p1

    if-eqz p1, :cond_0

    .line 12
    invoke-interface {p1}, Lcom/estrongs/fs/g;->getPath()Ljava/lang/String;

    move-result-object p1

    if-eqz p1, :cond_0

    .line 13
    invoke-virtual {p1, p2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result p1

    if-eqz p1, :cond_0

    .line 14
    invoke-static {}, Les/n30;->c()Les/n30;

    move-result-object p1

    invoke-virtual {p1}, Les/n30;->a()V

    :cond_0
    return-void
.end method

.method private b(Ljava/lang/String;)Z
    .locals 1

    .line 1
    invoke-virtual {p1}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object p1

    const-string v0, ".apps.googleusercontent.com"

    invoke-virtual {p1, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z

    move-result p1

    if-nez p1, :cond_0

    const/4 p1, 0x0

    return p1

    :cond_0
    const/4 p1, 0x1

    return p1
.end method

.method static synthetic c()Les/u30$b;
    .locals 1

    .line 1
    sget-object v0, Les/u30;->e:Les/u30$b;

    return-object v0
.end method

.method private c(Landroid/app/Activity;)V
    .locals 3

    .line 2
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/estrongs/android/ui/view/CreateOAuthNetDisk;

    invoke-direct {v0, p1, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "nettype"

    const-string v2, "gdrive"

    .line 3
    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string v1, "rest_upload"

    const/4 v2, 0x1

    .line 4
    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent;

    const/16 v1, 0x1033

    .line 5
    invoke-virtual {p1, v0, v1}, Landroid/app/Activity;->startActivityForResult(Landroid/content/Intent;I)V

    return-void
.end method

.method private d()V
    .locals 1

    .line 1
    iget-object v0, p0, Les/u30;->b:Lcom/estrongs/android/ui/dialog/r;

    if-eqz v0, :cond_0

    .line 2
    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/r;->dismiss()V

    const/4 v0, 0x0

    .line 3
    iput-object v0, p0, Les/u30;->b:Lcom/estrongs/android/ui/dialog/r;

    :cond_0
    return-void
.end method

.method public static declared-synchronized e()Les/u30;
    .locals 2

    const-class v0, Les/u30;

    monitor-enter v0

    .line 1
    :try_start_0
    sget-object v1, Les/u30;->d:Les/u30;

    if-nez v1, :cond_0

    .line 2
    new-instance v1, Les/u30;

    invoke-direct {v1}, Les/u30;-><init>()V

    sput-object v1, Les/u30;->d:Les/u30;

    .line 3
    invoke-direct {v1}, Les/u30;->f()V

    .line 4
    :cond_0
    sget-object v1, Les/u30;->d:Les/u30;
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    monitor-exit v0

    return-object v1

    :catchall_0
    move-exception v1

    monitor-exit v0

    throw v1
.end method

.method private f()V
    .locals 2

    const-string v0, "1033052592302-dh9bgum85ac61bd4keltlbpk0vqh5hdn.apps.googleusercontent.com"

    .line 1
    invoke-direct {p0, v0}, Les/u30;->b(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    return-void

    .line 2
    :cond_0
    iget-object v0, p0, Les/u30;->a:Les/v30;

    const/4 v1, 0x1

    invoke-interface {v0, v1}, Les/v30;->a(Z)V

    return-void
.end method


# virtual methods
.method public a()V
    .locals 1

    .line 25
    iget-object v0, p0, Les/u30;->a:Les/v30;

    invoke-interface {v0}, Les/v30;->a()V

    return-void
.end method

.method public a(Landroid/app/Activity;I)V
    .locals 1

    .line 3
    iget-object v0, p0, Les/u30;->a:Les/v30;

    invoke-interface {v0, p1}, Les/v30;->a(Landroid/app/Activity;)Z

    move-result v0

    if-eqz v0, :cond_2

    invoke-static {}, Lcom/estrongs/android/pop/l;->L1()Lcom/estrongs/android/pop/l;

    move-result-object v0

    invoke-virtual {v0}, Lcom/estrongs/android/pop/l;->u0()Z

    move-result v0

    if-eqz v0, :cond_0

    goto :goto_0

    .line 4
    :cond_0
    iput p2, p0, Les/u30;->c:I

    .line 5
    invoke-static {}, Lcom/estrongs/android/util/f0;->c()Z

    move-result v0

    if-nez v0, :cond_1

    const-string p2, "fail"

    .line 6
    invoke-virtual {p0, p2}, Les/u30;->a(Ljava/lang/String;)V

    const p2, 0x7f1105d9

    const/4 v0, 0x1

    .line 7
    invoke-static {p1, p2, v0}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;II)V

    return-void

    .line 8
    :cond_1
    invoke-direct {p0, p1, p2}, Les/u30;->b(Landroid/app/Activity;I)V

    return-void

    .line 9
    :cond_2
    :goto_0
    invoke-direct {p0, p1}, Les/u30;->c(Landroid/app/Activity;)V

    return-void
.end method

.method public a(Landroid/app/Activity;IILandroid/content/Intent;)V
    .locals 1

    packed-switch p2, :pswitch_data_0

    :pswitch_0
    goto :goto_1

    .line 11
    :pswitch_1
    invoke-direct {p0}, Les/u30;->d()V

    const/4 p2, 0x0

    if-eqz p4, :cond_0

    const-string p2, "path"

    .line 12
    invoke-virtual {p4, p2}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p2

    .line 13
    :cond_0
    sget-object p4, Les/u30;->e:Les/u30$b;

    if-eqz p4, :cond_2

    invoke-static {p2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result p4

    if-nez p4, :cond_2

    .line 14
    sget-object p4, Les/u30;->e:Les/u30$b;

    const/4 v0, -0x1

    if-ne p3, v0, :cond_1

    const/4 p3, 0x1

    goto :goto_0

    :cond_1
    const/4 p3, 0x0

    :goto_0
    invoke-interface {p4, p3, p2}, Les/u30$b;->a(ZLjava/lang/String;)V

    .line 15
    :cond_2
    invoke-direct {p0, p1, p2}, Les/u30;->b(Landroid/app/Activity;Ljava/lang/String;)V

    goto :goto_1

    .line 16
    :pswitch_2
    iget-object p2, p0, Les/u30;->a:Les/v30;

    invoke-interface {p2, p4}, Les/v30;->a(Landroid/content/Intent;)Ljava/lang/String;

    move-result-object p2

    if-nez p2, :cond_3

    .line 17
    invoke-direct {p0, p1}, Les/u30;->a(Landroid/app/Activity;)V

    goto :goto_1

    .line 18
    :cond_3
    invoke-direct {p0, p1, p2}, Les/u30;->a(Landroid/app/Activity;Ljava/lang/String;)Z

    :goto_1
    return-void

    nop

    :pswitch_data_0
    .packed-switch 0x1031
        :pswitch_2
        :pswitch_2
        :pswitch_1
        :pswitch_0
        :pswitch_2
    .end packed-switch
.end method

.method public a(Ljava/lang/String;)V
    .locals 1

    const-string v0, "googledrive"

    .line 24
    invoke-static {v0, p1}, Lcom/estrongs/android/statistics/c;->e(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public b()V
    .locals 3

    .line 15
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0}, Lorg/json/JSONObject;-><init>()V

    :try_start_0
    const-string v1, "from"

    .line 16
    iget v2, p0, Les/u30;->c:I

    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;I)Lorg/json/JSONObject;

    const-string v1, "action"

    const-string v2, "show"

    .line 17
    invoke-virtual {v0, v1, v2}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    .line 18
    invoke-static {}, Lcom/estrongs/android/statistics/b;->b()Lcom/estrongs/android/statistics/b;

    move-result-object v1

    const-string v2, "gsik"

    invoke-virtual {v1, v2, v0}, Lcom/estrongs/android/statistics/b;->c(Ljava/lang/String;Lorg/json/JSONObject;)V
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    :catch_0
    return-void
.end method
